$(function (){
    $("#delete").click( function(){
        const name = $("#name").val();
        $.ajax({
            type: "post",
            url: "http://localhost:9091/stu/delete",
            async:false,
            data:{name : name},
            dataType: "json",
            success: function(data){
                if(data.code===200){
                    alert('成功');
                    window.location.href="/stu/select"
                }else{
                    alert(data.msg)
                }

            },
            error: function(){
                alert("error!");
            }

        });
    })
})
